<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>标准列表</title>
    <link rel="stylesheet" href="${ctx}/static/styles/news/newslist.css" type="text/css">
</head>

<body>
<div class="news-main">
    <div class="container">
        <c:if test="${not empty message}">
            <div id="message" class="alert alert-success">
                <button data-dismiss="alert" class="close">×</button>
                    ${message}</div>
        </c:if>
        <h2>标准列表</h2>
        <a href="${ctx}/std/create" class="btn btn-primary">新增</a>
        <table class="table table-striped">
            <thead>
            <tr>
                <th>#</th>
                <th>标准号</th>
                <th>中文标题</th>
                <th>英文标题</th>
                <th>发布日期</th>
                <th class="col-md-3">管理</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${stds.content}" var="std">
                <tr>
                    <td>${std.id}</td>
                    <td><a href="${ctx}/std/detail/${std.id}">${std.name}</a></td>
                    <td><a href="${ctx}/std/detail/${std.id}">${std.titleCn}</a></td>
                    <td><a href="${ctx}/std/detail/${std.id}">${std.titleEn}</a></td>
                    <td><fmt:formatDate value="${std.publishDate}" type="date" dateStyle="long"/></td>
                    <td class="col-md-3"><a href="${ctx}/std/update/${std.id}" class="btn btn-warning">编辑</a>&nbsp;&nbsp;&nbsp;<a
                            href="${ctx}/annotate/${std.id}" class="btn btn-success">标注</a>&nbsp;&nbsp;&nbsp;<a
                            href="${ctx}/admin/std/delete/${std.id}" class="btn btn-danger">删除</a></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <tags:pagination page="${stds}" paginationSize="10"/>
    </div>
</div>
</body>
</html>
